package com.vvv.designpattern.mq;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author vvv
 * @date 2023-11-25 12 53
 * discription
 */
@Component
public class Consumer {

    @RabbitListener(queues = "deadQueue")
    public void listenDeadQueue(Message message) {
        String productId = new String(message.getBody());
        System.out.println("正常处理，为用户更新积分！ score = ");
        System.out.println("正常处理，为用户发放红包！ productId = " + productId);
    }
}
